<?php

class PostThread extends Eloquent
{
	protected $table = 'post_thread';
	public $timestamps = false;

	public static function add($post_id, $lawyer_id)
	{
		$post_thread = new PostThread();
		$post_thread->post_id = $post_id;
		$post_thread->user_id = $lawyer_id;
		$post_thread->save();
	}

	public static function getUserIdByPostId($post_id)
	{
		return self::where('post_id', '=', $post_id)->first();
	}
}